package com.ktjiaoyu.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ktjiaoyu.crm.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @InterfaceName : RoleMapper
 * @Description :
 * @Author : Lzz
 * @Date: 2023/11/22 10:01:40
 */
public interface RoleMapper extends BaseMapper<Role> {

    @Select("select r.* from sys_role r left join sys_user u on r.role_id=u.usr_role_id where u.usr_id=#{usrId}")
    Role findRoleByUserId(@Param("usrId") Long usrId);

}
